package com.ice.dockerredis.util;

import org.dom4j.DocumentException;
import org.dom4j.io.SAXReader;
import org.dom4j.Document;

import java.io.InputStream;

/**
 * @author icewinters
 */
public class DocumentUtils {

    public static Document readDocument(InputStream inputStream) {

        try {
            SAXReader saxReader = new SAXReader();
            Document document = saxReader.read(inputStream);
            return document;

        } catch (DocumentException ex) {
            ex.printStackTrace();
        }
        return null;

    }
}
